const ipc = require('electron').ipcRenderer;
var waitForExternal = setInterval(() => {
	var parent = document.getElementById('button');
	 if(parent!= null)
	 {
		clearInterval(waitForExternal); 
		parent.onclick = function(){
			console.log('123');
			ipc.send('test')
		}
	}
})